luci-mod-network: use firewall.getZoneColorStyle() in interface view
authorJo-Philipp Wich <[email protected]>
Thu, 11 Nov 2021 11:48:07 +0000 (12:48 +0100)
committerJo-Philipp Wich <[email protected]>
Tue, 15 Feb 2022 23:37:41 +0000 (00:37 +0100)
Use the new `firewall.getZoneColorStyle()` helper to apply background
zone color styles to the interface boxes.

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 849772df96784a0d5480ddf6305e30e7d442740f)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 49c68796378b1f6fb839906961b4b8b5f42efce5..611bbe81a78344fcbac33a705c5b86419db57a43 100644 (file)
@@ -1187,7 +1187,7 @@ return view.extend({
                        var node = E('div', { 'class': 'ifacebox' }, [
                                E('div', {
                                        'class': 'ifacebox-head',
-                                       'style': 'background-color:%s'.format(zone ? zone.getColor() : '#EEEEEE'),
+                                       'style': firewall.getZoneColorStyle(zone),
                                        'title': zone ? _('Part of zone %q').format(zone.getName()) : _('No zone assigned')
                                }, E('strong', net.getName().toUpperCase())),
                                E('div', {